{% extends 'gamer_view/base.html' %}
{% load static %}

{% block title_block %}
Register
{% endblock %}

{% block body_block %}

	<!-- 'Register' page content box -->
	<div class="content_box" id="register_content_box">
	
		<!-- if registered then return a message -->
		{% if registered %}
		<div id="successful_register_content_box">
			<p>Thank you for registering!</p><br/>
			<div class="button" id="register_homepage_return_button">
				<a href="{% url 'gamer_view:home' %}" id="register_homepage_return_button_text">Return to the homepage</a>
			</div>
		</div>
		
		<!-- register form display -->
		{% else %}
		<p>Register to Gamer-View</p>
		<form id="register_page" method="post" action="{% url 'gamer_view:register' %}" enctype="multipart/form-data">
			{% csrf_token %}

			<!-- display each form -->
			{{ user_form.as_p }}
			{{ profile_form.as_p }}

			<!-- provide a button to click to submit the form -->
			<input type="submit" name="submit" value="Register" class="button" id="register_button" />
		</form>
		{% endif %}
	</div>
	
{% endblock %}